package com.yzc.mihuyou.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yzc.mihuyou.entity.Give;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface GiveMapper extends BaseMapper<Give> {
    @Select("SELECT g.give_userid,i.invitation_headline,i.invitation_id,g.gmt_modified FROM give AS g\n" +
            "JOIN invitation AS i\n" +
            "ON g.invitation_id = i.invitation_id\n" +
            "WHERE g.invtation_prin=1 AND i.invitation_come = ${id}\n" +
            "ORDER BY g.`gmt_modified` DESC")
    public List<Give> themeGood(long id);

}
